import React from "react";
import { withRouter } from "react-router-dom";

function Header(props) {
  return (
    <div className="header">
      <h1>Header</h1>

      <button
        onClick={() => {
          props.history.goForward();
        }}
      >
        前进
      </button>
      <button
        onClick={() => {
          props.history.goBack();
        }}
      >
        后退
      </button>
    </div>
  );
}

export default withRouter(Header);
